<%-- 
    Document   : recibo
    Created on : 08-25-2012, 04:27:54 PM
    Author     : Alex
--%>

<%@page import="com.uca.sisbec.beans.NameAndCarnetBean"%>
<%@page import="java.util.List"%>
<%@page import="com.uca.sisbec.mapping.Gasto"%>


<%
    Gasto g = (Gasto) request.getAttribute("objGasto");
    List<NameAndCarnetBean> listBecBenef = (List<NameAndCarnetBean>) request.getAttribute("listaBecs");
    response.setContentType ("application/vnd.ms-excel"); //Tipo de fichero.
    response.setHeader ("Content-Disposition", "attachment;filename=\"report.xls\"");
%>

<html>
    <head>
        <style>
            #tableRec{
                margin: 0 auto;
                font-size: 30px;
                border-color: #000000;
                border-style: solid;
                border-width: medium;
                border-collapse: separate;
                width: 500px;
            }
        </style>
    </head>
    <body>
        <table id="tableRec" border="2">
            <tr>
                <th colspan="2">Programa de Becas</th>
            </tr>
            <tr>
                <th colspan="2" style="font-variant: small-caps">Recibo No. <%= request.getAttribute("recNo") %></th>
            </tr>
            <tr>
                <th style="height: 90px; text-align:right">Concepto:&nbsp;</th><th><%= g.getConcepto() %></th>
            </tr>
            <tr>
                <th style="height: 90px; text-align:right">Monto:&nbsp;</th><th>$<%= g.getMonto().toString() %></th>
            </tr>
            <tr>
                <th style="height: 90px; text-align:right">Fecha:&nbsp;</th><th><%= request.getAttribute("fecha") %></th>
            </tr>
            <tr>
                <th>Becarios beneficiados:</th>
                <th>
                    <%
                    
                    for(int i = 0; i < listBecBenef.size(); i++) {
                        out.print(listBecBenef.get(i).getNameAndCarnet() + "<br />");
                    }
                    
                    %>
                </th>
            </tr>
            <tr>
                <th style="height: 90px; text-align:right">Firma:&nbsp;</th><th>&nbsp;</th>
            </tr>
        </table>
    </body>
</html>